package com.binance.gateway.util;

import java.lang.reflect.InvocationTargetException;
import java.util.Map;

import org.apache.commons.beanutils.BeanUtils;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class MapUtil {
    public static void copyProperties(Map<String, Object> source, Object target) {
        try {
            BeanUtils.copyProperties(target, source);
        } catch (IllegalAccessException e) {
            log.error("copy map properties error", e);
        } catch (InvocationTargetException e) {
            log.error("copy map properties error", e);
        }
    }
}
